1. Field of the Invention
The field of the invention is data processing, or, more specifically, methods, apparatus, and products for memory allocation in a multi-node computer.
2. Description of Related Art
The development of the EDVAC computer system of 1948 is often cited as the beginning of the computer era. Since that time, computer systems have evolved into extremely complicated devices. Today's computers are much more sophisticated than early systems such as the EDVAC. Computer systems typically include a combination of hardware and software components, application programs, operating systems, processors, buses, memory, input/output devices, and so on. As advances in semiconductor processing and computer architecture push the performance of the computer higher and higher, more sophisticated computer software has evolved to take advantage of the higher performance of the hardware, resulting in computer systems today that are much more powerful than just a few years ago.
As computer systems have become more sophisticated, computer design has become increasingly modular. Often computer systems are implemented with multiple modular nodes, each node containing one or more computer processors, a quantity of memory, or both processors and memory. Complex computer systems may include many nodes and sophisticated bus structures for transferring data among the nodes.
The access time for a processor on a node to access memory on a node varies depending on which node contains the processor and which node contains the memory to be accessed. A memory access by a processor to memory on the same node with the processor takes less time than a memory access by a processor to memory on a different node. Access to memory on the same node is faster because access to memory on a remote node must traverse more computer hardware, more buses, bus drivers, memory controllers, and so on, between nodes.
The level of computer hardware separation between nodes containing processors and memory is sometimes referred to as “memory affinity”—or simply as “affinity.” In current computer systems, a node is considered to have the greatest memory affinity with itself because processors on the node can access memory on the node faster than memory on other nodes. Memory affinity between a node containing a processor and the node or nodes on which memory is installed decreases as the level of hardware separation increases.
Consider an example of a computer system characterized by the information in the following table:
Proportion of ProcessorProportion of MemoryNodeCapacityCapacity050%50%150%5%20%45%
The table describes a system having three nodes, nodes 0, 1, and 2, where proportion of processor capacity represents the processor capacity on each node relative to the entire system, and proportion of memory capacity represents the proportion of random access memory installed on each node relative to the entire system. An operating system may enforce affinity, allocating memory to a process on a processor only from memory on the same node with the processor. In this example, node 0 benefits from enforcement of affinity because node 0, with half the memory on the system, is likely to have plenty of memory to meet the needs of processes running on the processors of node 0. Node 0 also benefits from enforcement of memory affinity because access to memory on the same node with the processor is fast.
Not so for node 1. Node 1, with only five percent of the memory on the system is not likely to have enough memory to satisfy needs of processes running on the processors of node 1. In enforcing affinity, every time a process or thread of execution gains control of a processor on node 1, the process or thread is likely to encounter a swap of the contents of RAM out to a disk drive to clear memory and a load of the contents of the process's or thread's memory from disk, an extremely inefficient operation referred to as ‘swapping’ or ‘thrashing.’ Turning off affinity enforcement completely for memory on processors' local node may alleviate thrashing, but running with no enforcement of affinity also loses the benefit of affinity enforcement between processors and memory on well balanced nodes such as node 0 in the example above.